package com.dd.shop4j.console.common.controller;

import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 
 * @author tangshu
 *
 */
@Controller
@RequestMapping("/admin/menu")
public class MenuStatusController {

	private static final String MENU_STAtUS = "_shop4j_admin_menu_status_";
	
	@ResponseBody
	@RequestMapping("/{id}/{isOpen}")
	public void init(HttpSession session, @PathVariable("id") Integer id,
			@PathVariable("isOpen") boolean isOpen) {
		session.setAttribute(MENU_STAtUS + id, isOpen);
	}
	
}
